package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.time.LocalDate;
import java.util.List;

/**
 * 采购订单
 */
@Data
@NoArgsConstructor
@ToString
@TableName("t_buyorder")
public class BuyOrderBean {
    @TableId(value = "pk_buyOrderId", type = IdType.AUTO)
    /**采购订单id*/
    private Integer id;
    @TableField("fk_vendorId")
    /**供应商id*/
    private Integer vendorId;
    @TableField(exist = false)
    /**供应商*/
    private VendorBean vendor;
    @TableField("fk_userId")
    /**采购员id*/
    private Integer userId;
    @TableField(exist = false)
    /**采购员*/
    private UserBean user;
    @TableField("bo_createDate")
    /**采购时间*/
    private LocalDate createDate = LocalDate.now();
    @TableField(exist = false)
    /** 采购车详情集合*/
    private List<BuyOrderInfoBean> buyOrderInfoList;
    public BuyOrderBean(Integer vendorId, Integer userId) {
        this.vendorId = vendorId;
        this.userId = userId;
    }
}
